package com.sinosoft.sinopay.service.paychannel.entry.facade;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sinosoft.sinocloud.platform.common.web.pagequery.PageGrid;
import com.sinosoft.sinocloud.platform.common.web.pagequery.PageQueryModel;
import com.sinosoft.sinopay.paychannel.dto.PayThirdpayDTO;
import com.sinosoft.sinopay.paychannel.facade.PayChannelConfigFacadeService;
import com.sinosoft.sinopay.service.paychannel.biz.service.PayChannelConfigService;
import com.sinosoft.sinopay.service.paychannel.generated.model.PayThirdpayMain;
/**
 * 【支付渠道配置】
 * @author dengcanyang
 * @version V1.0
 * @date 2016-11-29 下午18:28
 */
@Service
public class PayChannelConfigFacadeServiceImpl implements PayChannelConfigFacadeService{
    @Autowired
    private PayChannelConfigService payChannelConfigService;

	@Override
	public PayThirdpayDTO findPayThirdpayInfoBySid(Integer cSid) {
		return payChannelConfigService.selectPayThirdpayInfoBySid(cSid);
	}

	@Override
	public boolean addPayChannel(PayThirdpayDTO cPayThirdpayDTO) {
		return payChannelConfigService.insertPayChannel(cPayThirdpayDTO);
	}

	@Override
	public boolean modifyPayChannelInfo(PayThirdpayDTO cPayThirdpayDTO) {
		return payChannelConfigService.updatePayChannelInfo(cPayThirdpayDTO);
	}

	@Override
	public PageGrid queryPayChannelInforList(PageQueryModel cPageQueryModel) {
		PageGrid tPageGrid = new PageGrid();
		tPageGrid = payChannelConfigService.selectPayChannelPageList(cPageQueryModel);
		return tPageGrid;
	}

	@Override
	public PayThirdpayDTO queryPayChannelDetailsBySid(String cSid) {
		return payChannelConfigService.selectPayChannelDetailsBySid(cSid);
	}

	@Override
	public boolean delPayChannelInforBySid(String cSid) {
		return payChannelConfigService.deletePayChannelInforBySid(cSid);
	}

	@Override
	public List<PayThirdpayDTO> queryThirdpayNameList() {
		return payChannelConfigService.selectThirdpayNameList();
	}

    @Override
    public PayThirdpayDTO queryPayThirdpayMainByThirdpayCode(String thirdpayCode) {
        return payChannelConfigService.queryPayThirdpayMainByThirdpayCode(thirdpayCode);
    }



}
